import request from '@/utils/request'

//查询一级数据类别和它的第二级数据类别的树接口
export function getDataTypeLevel2AndDataTypeLevel3Tree(dictCode) {
    return request({
        url: '/sysDataVersion/getDataTypeLevel2AndDataTypeLevel3Tree?dictCode='+dictCode,
        method: 'get',
    })
}

//查询版本列表
export function getSysDataVersion(query) {
    return request({
        url: '/sysDataVersion/getVersionList',
        method: 'get',
        params: query
    })
}

//查询版本号对应图层数据
export function queryDataByVersionCode(query) {
    let versionCode = query.versionCode;
    let typeCode = query.typeCode;
    let page = query.page;
    let rows = query.rows;
    return request({
        url: '/sysDataVersion/getYwData?versionCode='+versionCode+'&typeCode2='+typeCode+'&page='+page+'&rows='+rows,
        method: 'get'
    })
}

//根据ID查询数据属性表
export function queryDataById(query) {
    let id = query.id;
    let typeCode = query.typeCode;
    return request({
        url: 'basic/queryDataById?id='+id+"&typeCode="+typeCode,
        method: 'get'
    })
}